'\"macro stdmacro
.\"
.\" Copyright (C) 2015-2018 Marko Myllynen <myllynen@redhat.com>
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH ZBXPCP 3 "PCP" "Performance Co-Pilot"
.SH NAME
\f3zbxpcp\f1 \- Zabbix Agent Loadable PCP Module
.SH DESCRIPTION
The
.B zbxpcp
loadable module extends Zabbix agent by making Performance Co-Pilot
(PCP) metrics available to it.
With the
.B zbxpcp
module configured in
.I zabbix_agentd.conf
all the PCP metrics are available from the Zabbix agent like any other
agent items.
As a loadable module (DSO)
.B zbxpcp
does not rely on any external programs but directly uses the PCP APIs to
fetch PCP metrics when requested.
.PP
A typical Linux PCP installation offers over 1,000 metrics by default
and is in turn extensible with its own plugins, or PMDAs (``Performance
Metrics Domain Agents'').
In addition to very complete
.I /proc
based statistics, readily available PCP PMDAs provide support for such
system and application level components as 389 Directory Server, Apache,
containers, HAProxy, GFS2, Gluster, libvirt, MySQL, NFS, Oracle, Postfix,
PostgreSQL, Samba, and Sendmail, among others.
PCP also runs on many platforms, including Linux, macOS, FreeBSD,
NetBSD, Solaris, and Windows.
.PP
For PCP introduction, see
.BR PCPIntro (1).
To investigate the available PCP metrics, use for example
.BR pminfo (1).
The
.I PCP Quick Reference Guide
is available at the PCP home page https://pcp.io/.
.PP
For general information about Zabbix data collection and loadable
modules, see
https://www.zabbix.com/documentation/3.0/manual/config/items.
For Zabbix introduction and downloads, see https://www.zabbix.com/.
.PP
.B zbxpcp
is compatible with the Zabbix module API version
.BR 1 .
.SH CONFIGURATION
First make sure PCP is installed and configured properly, see the above
references for instructions and use for example
.BR pminfo (1)
to make sure the PCP metrics can be fetched.
To enable the
.B zbxpcp
loadable module in a Zabbix agent, the following lines must be added to
the Zabbix agent configuration file
.I zabbix_agentd.conf
(make sure to use the correct
.IR LoadModulePath ):
.sp 1
.RS +4
.ft CR
.nf
LoadModulePath=/usr/lib64/zabbix/agent/
LoadModule=zbxpcp.so
.fi
.ft P
.RE
.sp 1
After restarting the Zabbix agent all the PCP metrics will be available
with the ``\c
.BR pcp. ''
prefix like all the other agent items.
This can be verified with the commands:
.sp 1
.RS +4
.ft B
.nf
$ pminfo -t
$ zabbix_agentd -p
$ pminfo -f kernel.all.sysfork
$ zabbix_get -s 127.0.0.1 -p 10050 -k pcp.kernel.all.sysfork
.fi
.ft P
.RE
.PP
Then to collect PCP metrics from Zabbix agents, the Zabbix server side
configuration is as usual (see Zabbix documentation if needed).
.PP
The PCP
.B pmcd
service must always be running when starting up a
.B zbxpcp
enabled Zabbix agent, otherwise the module will fail to load and the PCP
metrics will not become available.
Special care must be taken to make sure this happens also when rebooting
the system.
.SH FILES
.TP
.I /etc/zabbix/zabbix_agentd.conf
Typical Zabbix agent configuration file location.
.TP
.I /etc/zabbix/zbxpcp-derived-metrics.conf
Optional PCP derived metrics configuration file for
.BR zbxpcp .
See
.BR pmLoadDerivedConfig (3)
for more info on derived metrics.
.TP
.I \f(CR$PCP_LIB_DIR\fP/zabbix/agent/zbxpcp.so
Zabbix agent loadable PCP module.
.PD
.SH SEE ALSO
.BR PCPIntro (1),
.BR pminfo (1),
.BR pmrep (1),
.BR zabbix_get (1),
.BR pmLoadDerivedConfig (3)
and
.BR zabbix_agentd (8).

.\" control lines for scripts/man-spell
.\" +ok+ LoadModulePath zabbix_agentd zabbix_get LoadModule HAProxy libvirt
.\" +ok+ Gluster FreeBSD Zabbix zbxpcp NetBSD GFS
